<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of answerclass
 *
 * @author Miss
 */
include_once("adb.php");
class answerclass extends adb {
    function answerclass(){
			adb::adb();
		}
		
		/**
		*query all applicant in the table and store the dataset in $this->result	
		*@return if successful true else false
		*/
		
		function get_all_answers(){
			$query="Select * from answers";
			return $this->query($query);
		}
			
		function add_answer($id, $name)
                {
			$query ="Insert into answers (specialist_id,name,date_answered) values ($id,'$name',now())";
                       // print $query;
			return $this->query($query);
		}
                
                function search($search)
                {
                        $query = "Select name from answers where name like '%$search%'";
                        //print $query;
                        return $this->query($query);                   
                }
    
    //put your code here
}
